<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="/js/vue.js"></script>
    <script type="text/javascript" src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script>
</head>
<body>
<form action="/dotest" method="post" id="login_form">
    <input type="text" v-model="account" name="account">
    <input type="password" name="password" v-model="password">
    <p v-on:click="login()">登入</p>
</form>
<div id="app1">
    mapaddress
</div>

</body>
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<script type="text/javascript" >
    new Vue({
        el:"#app1",
        data:{
            ip:""
        },
        created(){
            this.ip=returnCitySN["cip"];
            alert(this.ip)
            axios.get("/map?ip="+this.ip).then(res=>{
                console.log(res)
            })
        }
    })



    new Vue({
        el: "#login_form",
        data: {
            account : "",
            password : ""
        },
        methods: {
            login: function() {
                console.log(this.account)
                console.log(this.password)
                axios({
                    method:"post",
                    url:"/dotest",
                    data: {
                        account:"1234",
                        password:"1234"
                    }
                })
            }
        },
    })
</script>
</html>